home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-10 | 1.1 KB | 57 lines | [TEXT/MPCC] |
- // StopwordFilter.h
- // Copyright: © 1994 - 1998 by Apple Computer, Inc., all rights reserved.
- //
- // Given an input source of tokens, this class is capable of returning the next token.
- // Words on the stoplist will not be returned.
- //
- #pragma once
- #ifndef STOPWORDFILTER_h
- #define STOPWORDFILTER_h
-
-
-
- #pragma import on
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=power
- #endif
-
- #include "IAAnalysis.h"
-
- #pragma IA_BEGIN_EXPORTS
-
- class LetterTree;
- class IACharStream;
-
- IAExceptionCode NoInputTokenizer = 'VTNI';
-
- class StopwordFilter : public IATokenFilter {
-
-
- public:
-
- StopwordFilter(IATokenStream *source, IADocText* stopwordDoc);
- StopwordFilter(IATokenStream *source, char* stopwordFilePath);
-
- StopwordFilter( IATokenStream *source, LetterTree *stopwordDBParam )
- : IATokenFilter(source), fStopwordDB(stopwordDBParam), fRemove(false) {};
-
- virtual ~StopwordFilter();
-
- virtual IAToken *GetNextToken( void );
-
- private:
- LetterTree *fStopwordDB;
- bool fRemove;
-
- };
-
- #pragma IA_END_EXPORTS
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #endif
-
- #pragma import reset
-
- #endif